<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>淘宝轮播</title>
		<style>
			div 
			{
				padding: 30px;
				position: absolute;
			}
			ul {
				margin: 0px;
				padding: 0px;
				position: absolute;
				bottom: 35px;
				left: 40%;
			}
			
			.l {
				color: black;
				list-style: none;
				float: left;
				background: white;
				margin: 5px;
				padding: 5px;
			}
			
			.l:active {
				background: pink;
				cursor: pointer;
			}
		</style>
		<script type="text/javascript" src="js/jquery-1.12.4.js"></script>
		<script>
			$(function() {
				$(".l").click(function() {
						$("#image").attr("src", "img/" + this.innerHTML + ".jpg");
				})
			});
		</script>
	</head>
	<body>
		<div id="first">
			<img src="img/1.jpg" id="image" />
			<ul>
				<li class="l">1</li>
				<li class="l">2</li>
				<li class="l">3</li>
				<li class="l">4</li>
				<li class="l">5</li>
			</ul>
		</div>
	</body>
</html>